permutations combination trick

join shbcf.ru